package com.example.demo.cashier;

/**
 * @Author luoqin
 * @Date 2024/6/30 21:07
 * @Desc 折扣收费
 */
public class CashRebate extends CashSuper {

    private double moneyRebate = 1d;

    public CashRebate(String moneyRebate) {
        this.moneyRebate = Double.parseDouble(moneyRebate);
    }

    @Override
    public double acceptCash(double money) {
        return money * moneyRebate;
    }
}
